package com.itheima.stock.mapper;

import com.itheima.stock.entity.StockRtInfo;
import com.itheima.stock.vo.MoreAllVO;
import com.itheima.stock.vo.OptionVO;
import com.itheima.stock.vo.StockCountVO;
import com.itheima.stock.vo.UpDownVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author zby
 * @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
 * @created 2024-06-17 20:58:15
 *  对应实体类 {@link StockRtInfo}
 */
@Mapper
public interface StockRtInfoMapper {

    /**
     * 根据当前时间查询所有个股详情信息
     * @param last
     * @return
     */
    List<StockRtInfo> selectByCurTime(@Param("last")LocalDateTime last);

    /**
     * 分页查询
     * @param last
     * @return
     */
    List<MoreAllVO> selectMore(LocalDateTime last);

    List<OptionVO> upDown(@Param("begin") LocalDateTime begin,@Param("end") LocalDateTime end,@Param("flag") boolean flag);

    List<UpDownVO> select(@Param("tDate") LocalDateTime tDate);

    List<StockRtInfo> selectByBeginEndTime(@Param("begin")LocalDateTime begin, @Param("end")LocalDateTime end, @Param("code")String code);

    void insertBatch(@Param("infos")List<StockRtInfo> infos);
}




